-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add linter & fix errors #578
Conversation
@@ -26,7 +26,7 @@ | |||
"e2e:generate-fixtures": "npm run --workspace=test/func/fixtures generate", | |||
"e2e:test": "npm run --workspace=test/func/tests test", | |||
"e2e": "npm run e2e:build-packages && npm run e2e:generate-fixtures ; npm run e2e:test", | |||
"lint": "eslint .", | |||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we specify this in .eslintrc.js
itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. Looks like .eslintrc.js has no such option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides a few minor issues, looks good to me
@@ -103,7 +103,7 @@ describe('<BrowserTitle/>', () => { | |||
const browsersStateById = {'yabro': {checkStatus: UNCHECKED}}; | |||
const tree = mkStateTree({browsersById, resultsById, browsersStateById}); | |||
|
|||
const component = mkBrowserTitleComponent({browserId: 'yabro', browserName: 'yabro'}, {tree}); | |||
mkBrowserTitleComponent({browserId: 'yabro', browserName: 'yabro'}, {tree}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this line do anything? As far as I can tell we are just callling a function that returns a value and ignore the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It calls a stub that is used in assert inside the component.
@@ -35,6 +35,9 @@ describe('<ScreenshotAccepter/>', () => { | |||
}; | |||
|
|||
const mkScreenshotAccepterComponent = (props = {}, initialState = {}) => { | |||
if (!global.Element.prototype.scrollTo) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. How did it work before?
@@ -116,7 +116,7 @@ describe('<RunButton />', () => { | |||
|
|||
it('should switch to "Run checked tests" if there are checked tests', () => { | |||
selectorsStub.getCheckedTests.returns([{testName: 'testName', browserName: 'browserName'}]); | |||
const component = mkConnectedComponent(<RunButton />, { | |||
mkConnectedComponent(<RunButton />, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this line do anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It calls a stub that is used in assert inside the component.
Enable linter for .jsx, .ts and .tsx.